<?php

class BaseController {
  var $errs;
  var $messages;
  var $title;
  var $section;

  function __construct()
  {
  	$this->errs = array();
  	$this->messages = array();
  	$this->section = "songs";
  }

  function addError($error)
  {
  	array_push($this->errs, $error);
  }

  function addMessage($message)
  {
  	array_push($this->messages, $message);
  }

  function getParameter($paramName, $default = null)
  {
	  $value = $default;

	  if (isset($args))
	  {
	  	if (array_key_exists($paramName, $args))
	  		$value = $args[$paramName];
	  }

      if (array_key_exists($paramName, $_GET))
		$value = $_GET[$paramName];

      if (array_key_exists($paramName, $_POST))
		$value = $_POST[$paramName];



      return $value;
  }

}


?>
